package com.yaorange.nongjt.vo;

import com.yaorange.common.annotation.Excel;
import com.yaorange.common.annotation.Excels;
import com.yaorange.nongjt.domain.NjtCertificate;
import com.yaorange.nongjt.domain.NjtUserPerfect;

import java.util.Objects;

public class NjtCertificateVo extends NjtCertificate {
    /**
     * 会员完善信息
     */
    private String userPerfectString;
    /**
     * 会员完善信息
     */
    @Excels({
            @Excel(name = "公司名称", targetAttr = "companyName", type = Excel.Type.EXPORT),
            @Excel(name = "手机号码", targetAttr = "mobilePhone", type = Excel.Type.EXPORT),
            @Excel(name = "法人姓名", targetAttr = "legalPersonName", type = Excel.Type.EXPORT),
            @Excel(name = "省", targetAttr = "province", type = Excel.Type.EXPORT),
            @Excel(name = "市", targetAttr = "city", type = Excel.Type.EXPORT),
            @Excel(name = "区/县", targetAttr = "area", type = Excel.Type.EXPORT),
            @Excel(name = "镇/乡", targetAttr = "country", type = Excel.Type.EXPORT),
            @Excel(name = "详细地址", targetAttr = "detailAddress", type = Excel.Type.EXPORT),
    })
    private NjtUserPerfect userPerfect;

    public NjtCertificateVo(String userPerfectString, NjtUserPerfect userPerfect) {
        this.userPerfectString = userPerfectString;
        this.userPerfect = userPerfect;
    }

    public NjtCertificateVo() {
    }

    public String getUserPerfectString() {
        return userPerfectString;
    }

    public void setUserPerfectString(String userPerfectString) {
        this.userPerfectString = userPerfectString;
    }

    public NjtUserPerfect getUserPerfect() {
        return userPerfect;
    }

    public void setUserPerfect(NjtUserPerfect userPerfect) {
        this.userPerfect = userPerfect;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        NjtCertificateVo that = (NjtCertificateVo) o;
        return Objects.equals(userPerfectString, that.userPerfectString) && Objects.equals(userPerfect, that.userPerfect);
    }

    @Override
    public int hashCode() {
        return Objects.hash(userPerfectString, userPerfect);
    }
}
